﻿using Swimj.DomainLib.Entities;

namespace Production.DomainLib.AggregatesModel.ProductionPlanAggregate
{
    public class ProductionPlan : AuditableAggregateRoot<int>
    {
        /// <summary>
        /// 生产计划编码
        /// </summary>
        public string? PlanCode { get; set; }

        /// <summary>
        /// 生产计划名称
        /// </summary>
        public string? PlanName { get; set; }

        /// <summary>
        /// 销售订单标识
        /// </summary>
        public Guid? OrderId { get; set; }

        /// <summary>
        /// 销售订单编码
        /// </summary>
        public string? OrderCode { get; set; }

        /// <summary>
        /// 生产计划类型
        /// </summary>
        public int PlanType { get; set; }

        /// <summary>
        /// 单据日期
        /// </summary>
        public DateTime DocketDate { get; set; }

        /// <summary>
        /// 单据状态
        /// </summary>
        public int DocketStatus { get; set; }

        /// <summary>
        /// 预期开始时间
        /// </summary>
        public DateTime? ExpectStartDate { get; set; }

        /// <summary>
        /// 预期结束时间
        /// </summary>
        public DateTime? ExpectEndDate { get; set; }

        /// <summary>
        /// 优先级
        /// </summary>
        public int PriorityLevel { get; set; }

        /// <summary>
        /// 排程类型
        /// </summary>
        public int ScheduleType { get; set; }

        /// <summary>
        /// 产品标识
        /// </summary>
        public int ProductId { get; set; }

        /// <summary>
        /// 产品编码
        /// </summary>
        public string? ProductCode { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        public string? ProductName { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public double Quality { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Description { get; set; }

        public ProductionPlan()
        {
        }

        public ProductionPlan(string? planCode, string? planName, Guid? orderId, string? orderCode, int planType,
            DateTime docketDate, int docketStatus,
            DateTime? expectStartDate, DateTime? expectEndDate, int priorityLevel, int scheduleType,
            int productId, string? productCode, string? productName, double quality,
            string? description) : this()
        {
            PlanCode = planCode;
            PlanName = planName;
            OrderId = orderId;
            OrderCode = orderCode;
            PlanType = planType;
            DocketDate = docketDate;
            DocketStatus = docketStatus;
            ExpectStartDate = expectStartDate;
            ExpectEndDate = expectEndDate;
            PriorityLevel = priorityLevel;
            ScheduleType = scheduleType;
            ProductId = productId;
            ProductCode = productCode;
            ProductName = productName;
            Quality = quality;
            Description = description;
        }

    }
}